package com.youdianstar.app.common.loadsir;

import android.content.Context;
import android.view.View;

import com.youdianstar.app.common.R;
import com.kingja.loadsir.callback.Callback;

/**
 * File: LoadingCallback
 * Author: 82149 Create: 2021/9/18 15:31
 * Changes (from 2021/9/18)
 * --------------------------------------------------
 * description:
 * ---------------------------------------------------
 */
public class LoadingCallback extends Callback {
    @Override
    protected int onCreateView() {
        return R.layout.sir_layout_loading;
    }

    @Override
    public void onAttach(Context context, View view) {
        super.onAttach(context, view);
        //将Callback添加到当前视图时的回调，View为当前Callback的布局View
    }

    @Override
    public void onDetach() {
        super.onDetach();
        //将Callback从当前视图删除时的回调，View为当前Callback的布局View
    }

    @Override
    protected boolean onReloadEvent(Context context, View view) {
        //当前Callback的点击事件，如果返回true则覆盖注册时的onReload()，如果返回false则两者都执行，先执行onReloadEvent()。
        return super.onReloadEvent(context, view);
    }
}
